/**
 * Copyright &copy; 2016-2017 <a href="https://www.lczyfz.com">联创智云</a> All rights reserved.
 */
package com.lczyfz.campusinfo.modules.cms.service;

import java.util.List;

import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lczyfz.campusinfo.common.persistence.Page;
import com.lczyfz.campusinfo.common.service.CrudService;
import com.lczyfz.campusinfo.modules.cms.entity.CampusinfoAboutUs;
import com.lczyfz.campusinfo.modules.cms.dao.CampusinfoAboutUsDao;

/**
 * 关于我们Service
 * @author 陈维乾
 * @version 2018-04-19
 */
@Service
@Transactional(readOnly = true)
public class CampusinfoAboutUsService extends CrudService<CampusinfoAboutUsDao, CampusinfoAboutUs> {

	public CampusinfoAboutUs get(String id) {
		return super.get(id);
	}
	
	public List<CampusinfoAboutUs> findList(CampusinfoAboutUs campusinfoAboutUs) {
		return super.findList(campusinfoAboutUs);
	}
	
	public Page<CampusinfoAboutUs> findPage(Page<CampusinfoAboutUs> page, CampusinfoAboutUs campusinfoAboutUs) {
		return super.findPage(page, campusinfoAboutUs);
	}
	
	@Transactional(readOnly = false)
	public void save(CampusinfoAboutUs campusinfoAboutUs) {
		if (campusinfoAboutUs.getContent()!=null){
			campusinfoAboutUs.setContent(StringEscapeUtils.unescapeHtml4(
					campusinfoAboutUs.getContent()));
		}
		super.save(campusinfoAboutUs);
	}
	
	@Transactional(readOnly = false)
	public void delete(CampusinfoAboutUs campusinfoAboutUs) {
		super.delete(campusinfoAboutUs);
	}

}